import { request } from '@gui-pkg/request';

enum Api {
  resetPWD = '/api/gq/sys/table/manege/resetPWD', 
  getMenu = '/api/gq/sys/table/manege/findMenuListByUserId',
  getMenuByid = '/api/gq/sys/table/manege/findTableHeadByMenu',
  getHeaderByid = '/api/gq/sys/table/manege/findTableHeadList',
  saveOrUpdate = '/api/gq/sys/table/manege/saveOrUpdate'
}

//重置密码
export const resetPWD = (params) => {
  return request.post({ url: Api.resetPWD, params });
};

//获取菜单
export const getMenu = (params) => {
  return request.get({ url: Api.getMenu, params });
};

//根据菜单id获取表头
export const getMenuByid = (params) => {
  return request.get({ url: Api.getMenuByid, params });
};

//根据菜单id获取配置表头
export const getHeaderByid = (params) => {
  return request.get({ url: Api.getHeaderByid, params });
};

//保存
export const saveOrUpdate = (params) => {
  return request.post({ url: Api.saveOrUpdate, params });
};